const { query } = require('../../helper/db');
const { door, ok } = require('../../helper/util');

module.exports = async ctx => {
  var token = ctx.headers.authorization;
  var params = ctx.request.body;
  var user = await door(token);

  await query('update chat_records set status = 2 where id in (?)', [params.recordIDs]);

  ctx.body = ok(null);
};
